import type { RouteRecordRaw } from 'vue-router';

import { BasicLayout } from '#/layouts';
import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'lucide:copyright',
      order: 4,
      title: $t('page.apply.title'),
    },
    name: 'Apply',
    path: '/apply',
    children: [
      {
        name: 'ApplyList',
        path: '/apply/index',
        component: () => import('#/views/apply/index.vue'),
        meta: {
          title: $t('page.apply.list'),
        },
      },
      {
        name: 'ApplyDetail',
        path: '/apply/detail/:id',
        component: () => import('#/views/apply/detail.vue'),
        meta: {
          activePath: '/apply',
          hideInMenu: true,
          maxNumOfOpenTab: 3,
          title: $t('page.apply.detail'),
        },
      },
      {
        name: 'ApplyEdit',
        path: '/apply/edit/:id',
        component: () => import('#/views/apply/edit.vue'),
        meta: {
          activePath: '/apply',
          hideInMenu: true,
          maxNumOfOpenTab: 3,
          title: $t('page.apply.edit'),
        },
      },
      {
        name: 'ApplyDaily',
        path: '/apply/daily/:id',
        component: () => import('#/views/apply/daily.vue'),
        meta: {
          title: $t('page.apply.daily'),
        },
      },
      {
        name: 'ApplyCreate',
        path: '/apply/create',
        component: () => import('#/views/apply/create.vue'),
        meta: {
          activePath: '/apply',
          hideInMenu: true,
          maxNumOfOpenTab: 3,
          title: $t('page.apply.create'),
        },
      },
    ],
  },
];

export default routes;
